package cn.fsd.vo;

import cn.fsd.domain.CommodityClass;
import java.util.ArrayList;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
/**
 * 商品分类树结点
 */
public class ClassTreeItem {

  private String classId;
  private Integer level;
  private String name;
  private String parentId;
  private List<ClassTreeItem> children = new ArrayList<>();

  public ClassTreeItem(CommodityClass commodityClass){
    this.classId = commodityClass.getClass_id();
    this.level = commodityClass.getClass_category();
    this.name = commodityClass.getClass_name();
  }

}
